Holds information and allow control over a namespace in a scripting environment. More...
Public Member Functions | |
| Namespace (const nkMemory::StringView &name) | |
| virtual | ~Namespace () |
| nkMemory::StringView | getName () const |
| virtual Namespace * | getNamespace (const nkMemory::StringView &name) const =0 |
| virtual UserType * | getUserType (const nkMemory::StringView &name) const =0 |
| virtual void | setVar (const nkMemory::StringView &name, int value)=0 |
| virtual void | setObject (const nkMemory::StringView &name, const nkMemory::StringView &userTypeName, void *value)=0 |
| virtual Namespace * | setNamespace (const nkMemory::StringView &name)=0 |
| virtual UserType * | setUserType (const nkMemory::StringView &name)=0 |
| virtual Function * | setFunc (const nkMemory::StringView &name)=0 |
| virtual void | shutdown ()=0 |
| virtual void | reset ()=0 |
Holds information and allow control over a namespace in a scripting environment.
| nkScripts::Namespace::Namespace | ( | const nkMemory::StringView & | name | ) |
Constructor.
| name | The namespace name. |
|
virtual |
Destructor.
| nkMemory::StringView nkScripts::Namespace::getName | ( | ) | const |
|
pure virtual |
| name | The name of the sub namespace to retrieve. |
|
pure virtual |
| name | The name of the user type to retrieve. |
|
pure virtual |
Sets a variable within the namespace.
| name | The name of the variable to set. |
| value | The value it should have. |
|
pure virtual |
Sets an object within the namespace.
| name | The name of the object to set. |
| userTypeName | The user type name identifying the type of the object to set. |
| value | The user data pointer to attach. |
|
pure virtual |
Sets a sub namespace.
| name | The name of the sub namespace to set. |
|
pure virtual |
Sets a user type.
| name | The name of the type to set. |
|
pure virtual |
Sets a function.
| name | The name of the sub namespace to set. |
|
pure virtual |
Prepares the namespace for shutdown. In theory, should never be called by external code.
|
pure virtual |
Resets the namespace, to free all sub namespaces, functions, user types set on it.